<?php 
	if (!isset($v_sval)) 
		exit;
	$v_album_id = (isset($_REQUEST["hdn_album_id"])) ? $_REQUEST["hdn_album_id"] : 0;
	if ( $v_album_id ){
		$rs = getAllImageBasedOnAlbum($v_album_id);
		while ( $arr = mysql_fetch_assoc($rs) ){
			deleteImage($arr['IMAGE_ID']);
		}
		mysql_query(" DELETE FROM TB_ALBUM WHERE ALBUM_ID =  '".$v_album_id."'	 ")or die(mysql_error());	
	}
	
	redir($_SERVER["HTTP_REFERER"]);
?>	
